<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div class="panel collapse" minH="35" defH="35">
		<h1>操作面板</h1>
		<div>
			<div class="button"><div class="buttonContent" idf="lynn-recreate00"><button>重新生成</button></div></div>
			<a href="<%=basePath%>export!salaryReportExport.do">
				<div class="button"><div class="buttonContent" idf="lynn-export-salaryReport00"><button>导出工资表</button></div></div>
			</a>
		</div>
</div>


<div class="lynn-report-table-context">

</div>

<script>
var generateSalaryReport = 	function(){
	$.ajax({
		url:"<%=basePath%>statistics!salaryReport.do?flag=2"
	}).done(function(data) {
		$("div.lynn-report-table-context").html(data);
	});	
}

var exportSalaryReport = function () {
	
	$.ajax({
		url:"<%=basePath%>export!salaryReportExport.do"
	});
}

$("div[idf=lynn-recreate00]").click(function(event) {
	generateSalaryReport();
});

$("div[idf=lynn-export-salaryReport00]").click(function(event) {
	exportSalaryReport();
});

generateSalaryReport();
</script>